<?php

/**
 * @author dr4g0n
 * @copyright 2008
 */
error_reporting(E_ERROR | E_PARSE);

if (!IN_SITE)
    die("Hack attempt!");

//phprd classes
require_once "phprd/template/template.php";
require_once "phprd/users/users.php";
require_once "phprd/utils/utils.php";
require_once "phprd/ajax/ajax.php";
// DB class
require_once "../functions/db.php";
// Config class
require "../functions/config.php";

// Instance DB
$config["DB"]["db_file"] = "../sorter.db";
$config["DB"]["use_db"] = 1;
$db = new db($config);

// Instance and get config
$config_class = new config($db);
$config = $config_class->load_config("../");
$db = $config_class->get_db();

$errors = ErrorHandler::singleton();
$bench = new bench;
$bench->start();
$tmpl = new template;
$ajax = new ajax;

$template_path = __DIR__ . "/../../templates/sand/";
$tmpl->set_template_path($template_path);
?>